﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using spotnumbers.Model;
using spotnumbers.Controller;

namespace spotnumbers
{
    sealed partial class App : Application
    {
        
        public App()
        {
            this.InitializeComponent();
        }

        protected override void OnLaunched(LaunchActivatedEventArgs args)
        {
            GameController = (GameController)this.Resources["GameController"];
            var rootFrame = new Frame();
            rootFrame.Navigate(typeof(MainPage));
            
            Window.Current.Content = rootFrame;                        
            Window.Current.Activate();
        }

        public static App Instance()
        {
            return (App)Current;
        }

        public static GameController GameController;
        public static Game Game()
        {
            return GameController.Game;
        }
    }
}